<?php
/**
 * 订单模型
 * @author Max.Yu <max@jipu.com>
 */

namespace Shop\Model;

class StoreOrderModel extends ShopBaseModel {

  /**
   * 自动验证规则
   * @var array
   * @author Max.Yu <max@jipu.com>
   */
  protected $_validate = array(
  );

  /**
   * 自动完成规则
   * @var array
   * @author Max.Yu <max@jipu.com>
   */
  protected $_auto = array(
  );

  /**
   * 获取订单列表
   * @param $order_sn
   */
  public function lists($map, $order = '`id` DESC', $field = true, $limit = '10'){
    $result = $this->field($field)->where($map)->order($order)->limit($limit)->select();
    return $result;
  }
}